package com.ncs.base.task.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ncs.base.task.dao.master.UserMasterDao;
import com.ncs.base.task.entity.UserMasterEntity;
import com.ncs.base.task.service.UserMasterService;

@Service("userMasterService")
public class UserMasterServiceImpl extends ServiceImpl<UserMasterDao, UserMasterEntity> implements UserMasterService{
	

	@Autowired
	private UserMasterDao userMasterDao;
	
	@Override
	@DS("master")
	//@Transactional(propagation = Propagation.REQUIRES_NEW)
	public void setUserEntity(UserMasterEntity UserMasterEntity) {
	}

	@Override
	@DS("master")
	public List<UserMasterEntity> getuser(String table) {
		// TODO Auto-generated method stub
		UserMasterEntity userMasterEntity = new UserMasterEntity();
		userMasterEntity.setId(1L);
		userMasterEntity.setTableName(table);
		List<UserMasterEntity> aa  = userMasterDao.selectByPrimaryKey(1,table);
		
		return aa;
	}

}
